<template>
  <div class="product" @click="toDetails">
    <img class="banner" src="@/assets/images/login/banner.jpg" alt="">
     <span class="num">已售出1万+件</span>
    <span class="price">¥88.00</span>
  </div>
</template>

<script>
export default {
  name: "recommended-good",
  methods: {
    toDetails() {
    let toUrl = this.$router.resolve({
        path: '/goods/details',
        query: {
          url: ''
        }
      });
    window.open(toUrl.href, '_black')
    }
  }
}
</script>

<style scoped lang="less">
.product {
  cursor: pointer;
  .banner {
    display: block;
    width: 100%;
    border-radius: 4px;
  }
  .num {
    display: block;
    text-align: left;
    margin-top: 12px;
    margin-bottom: 2px;
    color: @t-title-color;
    font-size: 16px;
    font-weight: 500;
  }
  .price {
    display: block;
    text-align: left;
    color: @t-text-color;
    font-size: 12px;
    font-weight: 500;
  }
}
</style>